import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    LoginShow: false,
    check: false,
    form: false,
    num: 1,
    dlimgShow:true
  },
  getters: {
  },
  mutations: {
    changeLoginShow(state, playload) {
      state.LoginShow = playload
   
    },
    sjhopen(state, playload) {
      if (state.check == false) {
        state.form = true;
      } else {
        state.num = playload;
      }
    },
    sjhclose(state) {
      state.form = false;
    }
  },
  actions: {
    asyncSjh({ commit }, playload) {
      commit("sjhopen", playload),
        setTimeout(() => {
          commit("sjhclose")
        }, 1000)
    }
  },
  modules: {
  }
})
